﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace ClientTest
{
    public partial class FormConnectionInfo : Form
    {
        public static string ServerInstance;
        public static string DatabaseName;
        public static string Login;
        public static string Password;

        public FormConnectionInfo()
        {
            InitializeComponent();
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            FormConnectionInfo.ServerInstance = this.txtServerInstance.Text;
            FormConnectionInfo.DatabaseName = this.txtDatabase.Text;
            FormConnectionInfo.Login = this.txtUsername.Text;
            FormConnectionInfo.Password = this.txtPassword.Text;
            
            this.Close();
        }

        private void txtPassword_KeyPress(object sender, KeyPressEventArgs e)
        {
            if (e.KeyChar == (char)Keys.Return)
                btnOK_Click(sender, e);
        }
    }
}
